#!/usr/bin/bash

setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disable#g' /etc/selinux/config

systemctl stop firewalld.service
systemctl disable firewalld.service

chmod +x /etc/rc.d/rc.local

#yum install -y wget
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back
#wget http://mirrors.aliyun.com/repo/Centos-7.repo  -P /etc/yum.repos.d/
#mv /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
#yum install http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm -y
#yum install http://rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm -y

yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back
wget http://mirrors.aliyun.com/repo/Centos-7.repo  -P /etc/yum.repos.d/
mv /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
yum install http://rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm -y
yum install epel-release -y

yum clean all
yum makecache

#yum install openstack-selinux -y
yum install -y openstack-utils
yum install -y tree lrzsz nmap python-pip vim net-tools ntp iperf
yum install -y yum-plugin-priorities
yum install -y python-paramiko 

#createrepo -v /var/ftp/pub/Packages/


#ln -s 

echo "export LC_ALL=C" >> /etc/profile
echo "unset MAILCHECK" >> /etc/profile
#echo "export PS1='\[\e[31;1m\]\u@\[\e[34;1m\]\h \[\e[36;1m\]\w \[\e[33;1m\]\t # \[\e[37;1m\]'" >> /etc/profile
echo "export GREP_OPTIONS='--color=auto' GREP_COLOR='1;33'" >> /etc/profile
echo " *  -  nofile  65535" >> /etc/security/limits.conf
source /etc/profile

cp /etc/vimrc /etc/vimrc.back
cat>>/etc/vimrc<<EOF
set nu
set tabstop=2
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
EOF
source /etc/vimrc


